<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function arrReverse1(arr) {
        return arr.reverse();
      }

			function arrReverse2(arr) {
				for(let left = 0, right = arr.length - 1; left < right; ++left, --right) {
					[arr[left], arr[right]] = [arr[right], arr[left]];
				}
				return arr
			}

      let arr1 = ["h", "e", "l", "l", "o"];
      console.log(arr1, arrReverse1(arr1));

      let arr2 = ["h", "e", "l", "l", "o"];
      console.log(arr2, arrReverse2(arr2));
    </script>
  </body>
</html>
